package com.qd.system.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * @author sjk
 */
@Getter
@Setter
@Accessors(chain = true)
@TableName("sys_org")
public class Org extends Model<Org> implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId(value = "org_id", type = IdType.ASSIGN_ID)
    private String orgId;
    /**
     * 父级部门ID
     */
    @TableField("parent_id")
    private String parentId;
    /**
     * 机构名称
     */
    @TableField("org_name")
    private String orgName;
    /**
     * 显示顺序
     */
    @TableField("order_num")
    private Integer orderNum;
    /**
     * 负责人
     */
    @TableField("leader")
    private String leader;
    /**
     * 联系人
     */
    @TableField("contacts")
    private String contacts;
    /**
     * 联系人电话
     */
    @TableField("contacts_phone")
    private String contactsPhone;
    /**
     * 邮箱
     */
    @TableField("email")
    private String email;
    /**
     * 网址
     */
    @TableField("website")
    private String website;
    /**
     * 地址
     */
    @TableField("address")
    private String address;
    /**
     * 介绍
     */
    @TableField("remark")
    private String remark;
    /**
     * 机构状态:0正常 1停用
     */
    @TableField("org_status")
    private Integer orgStatus;
    /**
     * 添加时间
     */
    @TableField("add_time")
    private LocalDateTime addTime;
    /**
     * 更新时间
     */
    @TableField("update_time")
    private LocalDateTime updateTime;

    public void freeData() {
        this.orgId = null;
        this.parentId = null;
        this.orgName = null;
        this.orderNum = null;
        this.leader = null;
        this.contacts = null;
        this.contactsPhone = null;
        this.email = null;
        this.website = null;
        this.address = null;
        this.remark = null;
        this.orgStatus = null;
        this.addTime = null;
        this.updateTime = null;
    }

}
